<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        $a=100;$b=200;
        function add(){
            global $a,$b; #使用全局变量 
            return $a+$b;
        }
        echo add($a,$b);
        function test(&$a){
            $a=400;
        }
        $var=100;
        test($var);
        echo "<br>";
        echo "<br>".$var;
        function fac($i){
            echo $i."<br>";
            if ($i > 0)
                fac($i-1);
            echo $i.'<br>';
        }
        fac(20);
        ?>
    </body>
</html>
